package shared;

import java.io.Serializable;
import javax.xml.bind.annotation.*;

@SuppressWarnings("serial")
@XmlRootElement(name = "user")
public class User implements Serializable{
	
    private String _name;
	
    private String _password;
    
    public User() {
    	
    }
    
    public User(String name, String password) {
    	_name = name;
    	_password = password;
    }
    
    @XmlElement(name = "name")
    public String getName() {
    	return _name;
    }
    
    public void setName(String value) {
    	_name = value;
    }
    
    @XmlElement(name = "password")
    public String getPassword() {
    	return _password;
    }
    
    public void setPassword(String value) {
    	_password = value;
    }
    
    public boolean equals(Object other) {
    	if(this == other) {
    		return true;
    	} else if (other instanceof User) {
    		User otherUser = (User) other;
    		if(otherUser.getName() == _name) {
    			return true;
    		}
    	}
    	
    	return false;
    }
}
